package com.okaixz.framework.interceptor;



import com.okaixz.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
@Slf4j
public abstract class JwtTokenInterceptor implements HandlerInterceptor {




//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        log.info("JwtTokenUserInterceptor preHandle进入了===================================");
//        if(!(handler instanceof HandlerMethod)){
//            //当前拦截到的不是controller方法直接放行
//            return true;
//        }
//        String token = request.getHeader(jwtProperties.getUserTokenName());
//        log.info("interceptor token="+token);
//        if (StringUtils.isEmpty(token)) {
//            //没有token直接放行
//            return true;
//        }
//
//    }
}
